import api from "../api/api";
import { Get, Post } from "../api/axios";
export function adminLogin(data, callback) {
  Post(api.adminLogin, data, callback);
}
export function getOrdersEchartData(callback) {
  Get(api.getOrdersEchartData, callback);
}
export function getAdminUserList(data, callback) {
  Get(`${api.getAdminUserList}?page=${data.page}`, callback);
}
export function addCreateAdminUser(data, callback) {
  Post(api.addCreateAdminUser, data, callback);
}
export function updateAdminUser(data, callback) {
  Post(api.updateAdminUser, data, callback);
}
export function delAdminUser(data, callback) {
  Get(`${api.delAdminUser}?id=${data.id}`, callback);
}
export function usersList(data, callback) {
  Post(api.usersList, data, callback);
}
export function getPro(data, callback) {
  Post(api.getPro, data, callback);
}
export function getAllProType(callback) {
  Get(api.getAllProType, callback);
}
export function deldetailimg(data, callback) {
  Post(api.deldetailimg, data, callback);
}
export function addpro(data, callback) {
  Post(api.addpro, data, callback);
}
export function getDetail(data, callback) {
  Get(`${api.getDetail}?id=${data.id}`, callback);
}
export function updatepro(data, callback) {
  Post(api.updatepro, data, callback);
}
export function delPro(data, callback) {
  Post(api.delPro, data, callback);
}
export function getOrdersList(data, callback) {
  Post(api.getOrdersList, data, callback);
}
export function updateOrders(data, callback) {
  Post(api.updateOrders, data, callback);
}
export function getSetting(data, callback) {
  Post(api.getSetting, data, callback);
}
export function setSetting(data, callback) {
  Post(api.setSetting, data, callback);
}
export function delRole(data, callback) {
  Get(`${api.delRole}?title=${data.title}`, callback);
}
export function updateRole(data, callback) {
  Post(api.updateRole, data, callback);
}
